package com.aliyun.oss.UserService.impl;

import com.aliyun.oss.UserMapper.CategoryMapper;
import com.aliyun.oss.UserService.CategoryService;
import com.aliyun.oss.pojo.Entity.Category;
import com.aliyun.oss.pojo.Vo.ResultVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userCategoryServiceImpl")
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService{

    @Override
    public List<Category> list(Integer type) {
        List<Category> categoryList = baseMapper.selectList(new QueryWrapper<Category>().eq(type!=null,"type", type));
        return categoryList;
    }
}
